﻿export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        path: '/user',
        routes: [
          {
            name: 'login',
            path: '/user/login',
            component: './user/Login',
          },
        ],
      },
    ],
  },
  {
    path: '/dashboard',
    name: 'dashboard',
    icon: 'dashboard',
    routes: [
      {
        path: '/dashboard',
        redirect: '/dashboard/workplace',
      },
      {
        name: 'workplace',
        path: '/dashboard/workplace',
        component: './dashboard/workplace',
      },
    ],
  },
  {
    path: '/member',
    name: 'member',
    icon: 'user',
    routes: [
      {
        path: '/member',
        redirect: '/member/user',
      },
      {
        name: 'user',
        path: '/member/user',
        component: './member/user',
        access: 'getUserList',
      },
      {
        name: 'role',
        path: '/member/role',
        component: './member/role',
        access: 'getRoleList',
      },
    ],
  },
  {
    path: '/inventory',
    name: 'inventory',
    icon: 'hdd',
    routes: [
      {
        path: '/inventory',
        redirect: '/inventory/provider',
      },
      {
        name: 'provider',
        path: '/inventory/provider',
        component: './inventory/provider',
        access: 'getProviderList',
      },
      {
        name: 'supplier',
        path: '/inventory/supplier',
        component: './inventory/supplier',
        access: 'getSupplierList',
      },
      {
        name: 'oil',
        path: '/inventory/oil',
        component: './inventory/oil',
        access: 'getOilList',
      },
    ]
  },
  {
    path: '/analysis',
    name: 'analysis',
    icon: 'pieChart',
    routes: [
      {
        name: 'order',
        path: '/analysis/order',
        component: './analysis/order',
        access: 'tongjiOrder',
      },
      {
        name: 'oil',
        path: '/analysis/oil',
        component: './analysis/oil',
        access: 'getOilList',
      },
      {
        name: 'stock',
        path: '/analysis/stock',
        component: './analysis/stock',
        access: 'tongjiOil',
      },

      {
        name: 'provider',
        path: '/analysis/provider',
        component: './analysis/provider',
        access: 'tongjiProvider',
      },
      {
        name: 'supplier',
        path: '/analysis/supplier',
        component: './analysis/supplier',
        access: 'tongjiSupplier',
      },
    ]
  },
  {
    path: '/',
    redirect: '/dashboard',
  },
  {
    component: './404',
  },
];
